package com.star.warmwinter.http.api;

import com.star.warmwinter.http.base.BaseEntity;
import retrofit2.Call;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;

/**
 * Author: blackbai11
 * Date: 2016/11/17 15:44
 * Description: post请求
 */
public interface TestPostApi {
    /**
     * post 请求
     */
    @FormUrlEncoded
    @POST("Login")
    Call<BaseEntity<String>> login(@Field("user") String user, @Field("pwd") String pwd);//@FormUrlEncoded + @Field 多参数表单提交
//    Call<BaseEntity<String>> login(@FieldMap Map<String, String> params);//@FormUrlEncoded + @FieldMap map表单方式提交
//    Call<BaseEntity<String>> login(@Body Map<String, String> params);//map方式提交
//    Call<BaseEntity<String>> login(@Body UserBean bean);//bean 方式提交

    /**
     * 上传数组
     */
    @FormUrlEncoded
    @POST("contacts")
    Call<BaseEntity<String>> contacts(@Field("phone") String[] phone);//List<String> phones

}
